package com.cie2.janji.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;

@Entity
@Table(name="promise_statistics")
public class PromiseStatistics {

	private Long id;
	
	private	BaseEntity entity;
	
	private int totalPromise;
	
	private int realizedPromise;
	
	private int brokenPromise;
	
	private int unrealizedPromise;
	
	private int extendedPromise;

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NonVisual
	public Long getId() {
		return id;
	}
	
    @ManyToOne(targetEntity=BaseEntity.class)
    @JoinColumn(name="BASE_ENTITIY_ID")
	public BaseEntity getEntity() {
		return entity;
	}


	public int getBrokenPromise() {
		return brokenPromise;
	}

	public int getExtendedPromise() {
		return extendedPromise;
	}

	public int getRealizedPromise() {
		return realizedPromise;
	}

	public int getUnrealizedPromise() {
		return unrealizedPromise;
	}

	public int getTotalPromise() {
		return totalPromise;
	}

	public void setEntity(BaseEntity entity) {
		this.entity = entity;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setBrokenPromise(int promiseBroken) {
		this.brokenPromise = promiseBroken;
	}

	public void setExtendedPromise(int promiseExtended) {
		this.extendedPromise = promiseExtended;
	}

	public void setRealizedPromise(int promiseKeep) {
		this.realizedPromise = promiseKeep;
	}

	public void setUnrealizedPromise(int promiseUnrealized) {
		this.unrealizedPromise = promiseUnrealized;
	}

	public void setTotalPromise(int totalPromise) {
		this.totalPromise = totalPromise;
	}
	
	
}
